/* 公共样式 */

* {
    margin: 0;
    padding: 0;
}

body {
    // max-width: 1920px;
    min-width: 1226px;
    font-size: 14px;
    font-family: "Microsoft YaHei";
}

a {
    text-decoration: none;
}

i,
em {
    font-style: normal;
    font-weight: normal;
}

ul,
ol {
    list-style: none;
}

.fl {
    float: left
}

.fr {
    float: right
}

.ellipse {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hide {
    display: none;
}

img {
    border: none;
    vertical-align: middle;
}

input,
textarea,
button {
    outline: none;
    border: none;
}

/* 清除浮动和父子margin重叠 */

.clearfix:before,
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

.clearfix {
    zoom: 1;
}

.w1226 {
    width: 1226px;
    margin: 0 auto;
}

// 临时样式
.border {
    border-left: 1px solid slateblue;
    border-right: 1px solid slateblue;
}

// 公共头部
.header-bar {
    height: 40px;
    line-height: 40px;
    font-size: 12px;
    background-color: #333333;
    a {
        color: #B0B0B0;
        &:hover {
            color: #FFFFFF;
        }
    }
    .spacer {
        color: #4f4f4f;
        padding: 0 3px;
    }
}

.header-bar-l {
    float: left;
    .download {
        position: relative;
        display: inline-block;
        height: 40px;
        .pop {
            display: none;
            position: absolute;
            top: 41px;
            left: -50%;
            width: 124px;
            height: 148px;
            background-color: #fff;
            box-shadow: 0px 1px 5px #aaa;
            text-align: center;
            z-index: 2;
            &::after {
                position: absolute;
                top: -10px;
                left: 44px;
                content: "";
                width: 0;
                height: 0;
                border: 5px solid;
                border-color: transparent transparent #fff transparent;
            }
            img {
                width: 90px;
                height: 90px;
                margin-top: 18px;
            }
            p {
                font-size: 14px;
                color: #333333 !important;
            }
        }
    }
}

.header-bar-r {
    float: right;
    .login,
    .user-info {
        float: right;
        margin-right: 20px;
    }
    .user-info {
        .user {
            position: relative;
            float: left;
            &:hover {
                background-color: #fff;
            }
            &:hover .name {
                color: #424242;
            }
            &:hover i {
                color: #424242;
            }
        }
        .user-hd {
            display: block;
            width: 90px;
            height: 40px;
            padding: 0 10px;
            &:hover .name {
                color: #FF6700;
            }
            &:hover i {
                color: #FF6700;
            }
            .name {
                display: inline-block;
                width: 70px;
                height: 40px;
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
            }
            .iconfont {
                position: absolute;
                top: 0;
                right: 10px;
                font-size: 12px;
            }
        }
        .user-bd {
            display: none;
            position: absolute;
            top: 40px;
            left: 0;
            width: 110px;
            padding: 3px 0;
            background-color: #fff;
            text-align: center;
            box-shadow: 0px 2px 1px #ddd;
            z-index: 2;
            a {
                display: block;
                height: 30px;
                line-height: 30px;
                color: #424242;
                &:hover {
                    color: #FF6700;
                    background-color: #F5F5F5;
                }
            }
        }
    }
    .cart {
        position: relative;
        float: right;
        width: 120px;
        height: 40px;
        background-color: #424242;
        &:hover .cart-hd {
            color: #FF6700;
            background: #fff;
        }
        .iconfont {
            vertical-align: top;
        }
    }
    .cart-hd {
        display: block;
        text-align: center;
    }
    .cart-bd {
        display: none;
        position: absolute;
        right: 0;
        width: 316px;
        padding-top: 10px;
        background-color: #fff;
        box-shadow: 0px 2px 1px #ddd;
        z-index: 2;
    }
    .cart-list {
        max-height: 400px;
        padding: 0 20px;
        overflow: auto;
        li {
            position: relative;
            border-top: 1px solid #E0E0E0;
            padding: 10px 0;
            overflow: hidden;
            &:hover .del {
                opacity: 1;
                transition: all 0.3s;
            }
            &.first {
                border-top: 0;
            }
        }
        .pic {
            float: left;
            margin-right: 10px;
            img {
                width: 60px;
                height: 60px;
            }
        }
        .val {
            float: left;
            width: 95px;
            height: 40px;
            line-height: 20px;
            margin: 10px 0;
            color: #424242;
            overflow: hidden;
            &:hover {
                color: #FF6700;
            }
            .tag {
                color: #E53935;
            }
        }
        .price {
            float: right;
            margin: 10px 16px;
        }
        .del {
            opacity: 0;
            position: absolute;
            top: 20px;
            right: 0px;
            &:hover {
                color: #484848;
            }
            i {
                font-size: 12px;
            }
        }
    }
    .cart-total {
        background-color: #FAFAFA;
        padding: 15px 20px 10px;
        .total {
            float: left;
            color: #757575;
            p {
                line-height: 22px;
                &.price {
                    color: #FF6700;
                }
            }
            em {
                font-size: 24px;
            }
        }
        .btn {
            float: right;
            width: 132px;
            height: 40px;
            color: #fff;
            background-color: #FF6700;
            cursor: pointer;
        }
    }
}

.header-content {
    position: relative;
    height: 100px;
}

.header-nav-m {
    display: none;
    position: absolute;
    top: 100px;
    left: 0;
    width: 100%;
    height: 215px;
    background-color: #fff;
    z-index: 5;
    box-shadow: 0px 15px 15px -20px #666;
    border-top: 1px solid #E0E0E0;
}

.header-logo {
    float: left;
    margin-top: 22px;
    a {
        display: block;
        width: 55px;
        height: 55px;
        background: url(../img/mi-logo.png) #FF6700 no-repeat 5px;
    }
}

.nav-category {
    position: relative;
    .category-content {
        position: absolute;
        left: -115px;
        width: 230px;
        padding: 19px 0;
        border: 1px solid #FF6700;
        z-index: 5;
        >li {
            &:hover .category-detail {
                display: block;
                background-color: #fff;
            }
            >a {
                position: relative;
                display: block;
                height: 42px;
                line-height: 42px;
                padding-left: 30px;
                color: #424242;
                &:hover {
                    color: #fff;
                    background-color: #FF6700;
                }
                .iconfont {
                    position: absolute;
                    right: 20px;
                    color: #E0E0E0;
                    font-size: 12px;
                }
            }
        }
        .category-detail {
            display: none;
            position: absolute;
            width: 993px;
            height: 432px;
            border: 1px solid #E0E0E0;
            box-shadow: 0px 1px 10px #aaa;
            padding: 13px 0;
            border-left: 0;
            top: -1px;
            left: 231px;
            li {
                float: left;
                width: 208px;
                height: 40px;
                padding: 16px 20px;
            }
            a {
                display: block;
                color: #333;
                &:hover {
                    color: #FF6700;
                }
            }
            img {
                width: 40px;
                height: 40px;
                margin-right: 10px;
            }
        }
    }
}

.header-nav {
    float: left;
    padding: 14px 0 0 60px;
    &>li {
        float: left;
        &>a {
            display: block;
            padding: 25px 10px 40px;
            color: #333333;
            font-size: 16px;
            &:hover {
                color: #FF6700;
            }
        }
    }
}

.header-nav-menu {
    display: none;
    ul {
        width: 1224px;
        padding: 35px 1px 30px;
        margin: 0 auto;
    }
    li {
        position: relative;
        float: left;
        width: 204px;
        text-align: center;
        .pic {
            img {
                height: 100px;
                margin-bottom: 10px;
            }
        }
        p {
            color: #FF6700;
            font-size: 12px;
            line-height: 20px;
        }
        .title a {
            color: #333;
        }
        &::after {
            position: absolute;
            top: 0;
            left: 0;
            content: "";
            width: 1px;
            height: 100px;
            background: #E0E0E0;
        }
        &.first::after {
            display: none;
        }
    }
}

.header-search {
    position: relative;
    float: right;
    width: 296px;
    height: 50px;
    margin-top: 25px;
    font-size: 12px;
    .search-input {
        position: absolute;
        width: 223px;
        height: 18px;
        padding: 15px 10px;
        border: 1px solid #E0E0E0;
    }
    .search-btn {
        position: absolute;
        right: 0;
        width: 50px;
        height: 48px;
        line-height: 48px;
        color: #616161;
        text-align: center;
        border: 1px solid #E0E0E0;
        &:hover {
            color: #fff;
            border: 1px solid #FF6700;
            background-color: #FF6700;
        }
        i {
            font-size: 24px;
        }
    }
    .hot-words {
        position: absolute;
        right: 62px;
        top: 50%;
        margin-top: -9px;
        a {
            display: inline-block;
            height: 18px;
            line-height: 18px;
            color: #757575;
            background-color: #EEEEEE;
            padding: 0 5px;
            margin-left: 5px;
            &:hover {
                color: #fff;
                background-color: #FF6700;
            }
        }
    }
    .keyword-list {
        display: none;
        position: absolute;
        width: 243px;
        top: 49px;
        background-color: #fff;
        border: 1px solid #FF6700;
        z-index: 10;
        a {
            display: block;
            line-height: 30px;
            color: #424242;
            padding-left: 16px;
            &:hover {
                background-color: rgb(255, 239, 239);
            }
        }
    }
}

// 公共底部
.footer-info {
    .service {
        padding: 26px 0;
        border-bottom: 1px solid #E0E0E0;
        li {
            float: left;
            width: 244px;
            border-right: 1px solid #E0E0E0;
            text-align: center;
            &:last-child {
                border: none;
            }
            a {
                color: #616161;
                font-size: 16px;
                .iconfont {
                    font-size: 24px;
                    vertical-align: -3px;
                    margin-right: 5px;
                }
                &:hover {
                    color: #FF6700;
                }
            }
        }
    }
    .links {
        overflow: hidden;
        padding: 40px 0;
        .left {
            float: left;
            border-right: 1px solid #E0E0E0;
            padding-right: 19px;
        }
        .column {
            width: 160px;
            float: left;
            dt {
                color: #424242;
                margin-bottom: 25px;
            }
            dd {
                margin-top: 5px;
                a {
                    color: #757575;
                    font-size: 12px;
                    &:hover {
                        color: #ff6700;
                    }
                }
            }
        }
        .right {
            text-align: center;
            p {
                color: #616161;
                font-size: 12px;
                margin-top: 4px;
            }
            .phone {
                font-size: 22px;
                color: #ff6700;
            }
            .operator {
                display: inline-block;
                width: 118px;
                height: 28px;
                line-height: 28px;
                color: #ff6700;
                border: 1px solid #ff6700;
                margin-top: 10px;
                &:hover {
                    color: #fff;
                    background: #F25807;
                }
            }
        }
    }
}

.footer-copyright {
    padding: 30px 0;
    background-color: #FAFAFA;
    .footer-logo {
        float: left;
        width: 55px;
        height: 55px;
        background: url(../img/mi-logo.png) #FF6700 no-repeat 5px;
        margin-right: 10px;
    }
    .copyright-info {
        width: 1160px;
        float: right;
        .sites {
            font-size: 12px;
            margin-bottom: 5px;
        }
        a {
            color: #757575;
            &:hover {
                color: #ff6700;
            }
        }
        .spacer {
            color: #b0b0b0;
        }
        p {
            color: #B0B0B0;
            line-height: 18px;
            font-size: 12px;
            a {
                color: #B0B0B0;
            }
        }
        .cert {
            margin-top: 5px;
            img {
                height: 28px;
            }
        }
    }
}